<template>
  <div>
    <h3>这是第十八个demo:自定义hook</h3>
    <p>个数：{{ num }}，放大10倍：{{ tennum }}</p>
    <button @click="addnum">加一</button>
    <br>
    <img v-for="(item) in list" :key='item.id'  :src="item.address" alt="">
    <br>
    <button @click="addImg">添加</button>
  </div>
</template>

<script setup lang='ts' name="Demo18">
import useCount from '@/hooks/useCount'
import useList from '@/hooks/useList'

//解构赋值
const {list,addImg} = useList()
const {num,tennum,addnum} = useCount()

</script>


<style lang='scss' scoped></style>